#define _CRT_SECURE_NO_WARNINGS 1
#include"SeqList.h"

void TestSeqList1()
{
	SL s;
	SeqListInit(&s);

	SeqListPushBack(&s, 1);
	SeqListPushBack(&s, 2);
	SeqListPushBack(&s, 3);
	SeqListPushBack(&s, 4);
	SeqListPushBack(&s, 5);
	SeqListPrint(s);

	SeqListPushFront(&s, 4);
	SeqListPushFront(&s, 3);
	SeqListPushFront(&s, 2);
	SeqListPushFront(&s, 1);

	SeqListPrint(s);

	SeqListPopBack(&s);
	SeqListPopBack(&s);
	SeqListPopBack(&s);

	SeqListPrint(s);
	
	SeqListPopFront(&s);
	SeqListPopFront(&s);
	SeqListPopFront(&s);
	SeqListPrint(s);

	SeqListPopFront(&s);
	SeqListPrint(s);

	SeqListPopFront(&s);
	SeqListPrint(s);

	SeqListPopFront(&s);
	SeqListPrint(s);

	SeqListPopFront(&s);
	SeqListPrint(s);

	SeqListPopFront(&s);
	SeqListPopFront(&s);

}
void TestSeqList2()
{
	SL s;
	SeqListInit(&s);

	SeqListPushBack(&s, 1);
	SeqListPushBack(&s, 2);
	SeqListPushBack(&s, 3);
	SeqListPushBack(&s, 4);
	SeqListPushBack(&s, 5);
	SeqListPrint(s);

	int pos = SeqListFind(&s, 3);
	
	SeqListInsert(&s, pos, 5);
	SeqListInsert(&s, pos, 6);
	SeqListInsert(&s, pos, 7);
	SeqListPrint(s);

	SeqListErase(&s, pos);
	SeqListErase(&s, pos);
	SeqListErase(&s, pos);
	SeqListPrint(s);

}
int main()
{
	//TestSeqList1();
	TestSeqList2();
	return 0;
}